Skip to content

[DOCS-10653] Obs Pipelines OCSF Custom Configuration #28892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

maycmlee
Copy link
Contributor

@maycmlee maycmlee commented Apr 21, 2025

What does this PR do? What is the motivation?

  • Adds OP OCSF Custom Configuration doc.
  • Adds 4th-level nav item.
  • Moves Remap OCSF to its own folder.

Merge instructions

Merge readiness:

  • Ready for merge

For Datadog employees:
Merge queue is enabled in this repo. Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass in CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.

If your branch doesn't follow this format, rename it or create a new branch and PR.

To have your PR automatically merged after it receives the required reviews, add the following PR comment:

/merge

Additional notes

@maycmlee maycmlee added the WORK IN PROGRESS No review needed, it's a wip ;) label Apr 21, 2025
@maycmlee maycmlee requested a review from a team as a code owner April 21, 2025 19:53
Copy link
Contributor

github-actions bot commented Apr 21, 2025

@maycmlee maycmlee requested a review from a team as a code owner April 21, 2025 20:46
@github-actions github-actions bot added the Architecture Everything related to the Doc backend label Apr 21, 2025
All enumerated name or label fields identified in the OCSF schema are converted to their sibling `id` field. For example, the string field `severity` is automatically converted to the numeric field `severity_id` based on the standard enum value table defined in the OCSF schema. If no matching value is found in the lookup table, the `id` field is set to `99` to represent `Other`.

If one of the listed `profiles` in the metadata section is `datetime`, the mapping
automatically has all numeric timestamps identified in the OCSF schema converted into the sibling field `{DEST}_dt`. For example, the numeric `time` field is converted into `time_dt`, which contains a string representation of that timestamp. No additional work is required to support the `datetime` profile.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a link to the OCSF schema we can add here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OCSF is composed of multiple schemas, the choice of which is specified by the version, class, and profiles given in the metadata section. The complete schema can be browsed here: https://schema.ocsf.io/

@maycmlee maycmlee requested review from a team as code owners April 24, 2025 14:54
@maycmlee maycmlee requested review from a team as code owners April 28, 2025 15:15
This reverts commit f418d94.
@maycmlee maycmlee removed request for a team April 28, 2025 15:21
- type
- subtype
- null
- 'wildcard*'
Copy link
Contributor Author

@maycmlee maycmlee Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bruceg is there a reason why 'wildcard*' is in quotes here?

Copy link
Contributor

@bruceg bruceg Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quoted it in the belief that the YAML parser might interpret it differently without the quotes. That is, they should all be strings except for the null values, but the auto-quoting would handle the others and I just wasn't sure about this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it out here: https://yaml-online-parser.appspot.com/
And it seems like wildcard* does get auto-quoted without me having to add the quotes, but we can leave it if it's better to have it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is auto-quoted, then I think we should unify the formatting for simplicity.

@maycmlee maycmlee requested a review from drichards-87 April 28, 2025 19:30
@maycmlee
Copy link
Contributor Author

Thanks @drichards-87 ! I applied all of your suggestions and also clarified one of the sections you had a question about.

@maycmlee maycmlee removed the WORK IN PROGRESS No review needed, it's a wip ;) label May 23, 2025
Copy link

@20agbekodo 20agbekodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this "Import configuration file" feature is only partially supported in the UI right now: only the mapping field and profiles fields are supported, which means the JSON will look like

{
"mapping":[...]
"profiles":[...]
}

but this doc is exactly what the final iteration will look like in the UI. Can we potentially wait before releasing this doc? (this will arrive sometimes during Q2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Everything related to the Doc backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants